﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace DesignPattern
{
    class Program
    {
        static void Main(string[] args)
        {
            //for(int i=0;i<100;i++)
            //{
            //    Danli1.Instance.IncreatCount();
            //}
            //Console.WriteLine(Danli1.Instance.Count);

            Parallel.For(0, 100, (k) =>
            {
                for (int j = 0; j < 100; j++)
                {
                    Danli.Instance.IncreatCount();
                }
            });

            Console.WriteLine(Danli.Instance.Count);
            

        }
    }
}
